package com.dong.rwmysql.service;

import com.dong.rwmysql.annotation.Master;
import com.dong.rwmysql.bean.UserEntity;
import com.dong.rwmysql.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserService {

    @Autowired
    UserMapper userMapper;


    public List<UserEntity> findAll() {
        return userMapper.findAll();
    }

    @Master
    public int insertUser(UserEntity user) {
        return userMapper.insert(user);
    }

//    void update(UserEntity user);
//
//    void delete(Long id);

}
